﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace S3_Sync.ViewModel
{
    public class ViewModelBase : INotifyPropertyChanged
    {
        //Use this in conjunction with another "TabbedControl" to define what happens when, say, NextButtonCalled() and BackButtonCalled() or ClickedOffOf() and ClickedOn()
        //therefore each ViewModel that can be selected will inherit from ViewModelSelector and automatically have INotifyPropertyChanged and common functionality
        public event PropertyChangedEventHandler PropertyChanged;

        protected void NotifyPropertyChanged(string propertyName)
        {
            PropertyChangedEventHandler handler = this.PropertyChanged;
            if (handler != null)
            {
                var e = new PropertyChangedEventArgs(propertyName);
                handler(this, e);
            }
        }
    }
}
